package com.huan.social.weixin.connect;

import lombok.Getter;
import lombok.Setter;
import org.springframework.social.oauth2.AccessGrant;

/**
 * 因为微信会将 openId 和 访问令牌一起返回,而默认的 AccessGrant 类中是没有 openId的
 *
 * @author huan.fu
 * @date 2018/9/27 - 11:19
 */
@Getter
@Setter
public class WeixinAccessGrant extends AccessGrant {

	/**
	 * 微信用户的 openId
	 */
	private String openId;

	public WeixinAccessGrant(String accessToken, String scope, String refreshToken, Long expiresIn, String openId) {
		super(accessToken, scope, refreshToken, expiresIn);
		this.openId = openId;
	}
}
